const { resolve } = require('./utils')
const TsconfigPathsWebpackPlugin = require('tsconfig-paths-webpack-plugin')

module.exports = {
  extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
  alias: {
    'react-dom': '@hot-loader/react-dom' // React-Hot-Loader: react-🔥-dom patch is not detected. React 16.6+ features may not work
  },
  plugins: [
    // @ts-ignore
    new TsconfigPathsWebpackPlugin({
      configFile: resolve('tsconfig.json'),
    })
  ]
}
